<template>
  <section class="todo-container center-flex">
    <div class="todo-content">
      <todo-title></todo-title>

      <todo-list :data.sync="data" @change="updateTodo"></todo-list>
    </div>
  </section>
</template>

<script>
import TodoTitle from './TodoTitle.vue'
import TodoList from './TodoList.vue'

export default {
  components: {
    TodoTitle,
    TodoList
  },
  data() {
    return {
      data: [
        { id: 1, content: '这周的完成任务', is_done: 1, create_time: '2018-10-30 10:10:10' },
        { id: 2, content: '这周的完成任务2', is_done: 0, create_time: '2018-10-10 10:10:10' }
      ]
    }
  },
  methods: {
    updateTodo() {

    },
    test() {
      this.$http({
        url: '/api/birthday'
      })
    }
  }
}
</script>


<style lang="scss">
.todo-container {
  height: 100vh;
  font-size: 14px;
  color: #eee;
  line-height: 1.5;
  .todo-content {
    background: rgba(0, 0, 0, 0.95);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    &::-webkit-scrollbar {
      display: none;
    }
  }
}

@media (min-width: 768px) {
  .todo-container {
    .todo-content {
      background: black;
      width: 375px;
      height: 667px;
      border-radius: 8px;
    }
  }
}
</style>
